package frame;

import tree.BINOP;
import tree.CONST;
import tree.Exp;
import tree.MEM;

public class InFrame extends frame.Access {

	int offset;

	public InFrame(int o) {
		offset = o;
	}

	@Override
	public Exp exp(Exp fp) {
		return new MEM(new BINOP(BINOP.PLUS, fp, new CONST(offset)));
	}

	@Override
	public String toString() {
		Integer offset = new Integer(this.offset);
		return offset.toString();
	}
}
